package com.zzl.bonds.ticket.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 开立申请表
 *
 * @author gull
 * @date 2022-07-06 13:43:52
 */
@Data
@TableName("t_ticket_open")
@ApidocModel
@SuppressWarnings("javadoc")
public class TicketOpenEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键 uuid/ 业务流水号")
    private String id;
    @ApidocModelProperty(description = "开单企业id")
    private String openEnterpriseId;
    @ApidocModelProperty(description = "开单企业名称")
    private String openEnterpriseName;
    @ApidocModelProperty(description = "开单企业统一社会信用代码")
    private String openSocialCreditCode;
    @ApidocModelProperty(description = "收单企业id")
    private String receiveEnterpriseId;
    @ApidocModelProperty(description = "收单企业名称")
    private String receiveEnterpriseName;
    @ApidocModelProperty(description = "收单企业统一社会信用代码")
    private String receiveSocialCreditCode;
    @ApidocModelProperty(description = "授信id")
    private String coreEnterpriseCreditId;
    @ApidocModelProperty(description = "金融机构id")
    private String instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;
    @ApidocModelProperty(description = "票据金额")
    private Double ticketAmount;
    @ApidocModelProperty(description = "票据编号")
    private String ticketNo;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date invoiceTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;
    @ApidocModelProperty(description = "基础合同编号")
    private String contractNo;
    @ApidocModelProperty(description = "票据状态 确认中：1 内部复核中2 平台审批中3 收单企业签收中失败：4 收单企业驳回5 内部复核未通过6 平台审批未通过7 已撤销成功：8 已签收")
    private Integer ticketStatus;
    @ApidocModelProperty(description = "审批状态 10：核心企业驳回 11、核心企业通过 20、平台驳回 21、平台通过 30、供应商驳回、31 供应商通过")
    private Integer approveStatus;
    @ApidocModelProperty(description = "平台复核备注")
    private String platformCheckRemark;
    @ApidocModelProperty(description = "开票方复核备注")
    private String openCheckRemark;
    @ApidocModelProperty(description = "供应商签收备注")
    private String supplierCheckRemark;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "平台审批时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date platApprovalTime;
    @ApidocModelProperty(description = "平台审核人")
    private Integer platApprovalId;
    @ApidocModelProperty(description = "上链地址")
    private String chainAddress;
    @ApidocModelProperty(description = "企业id")
    private String enterpriseId;
    @ApidocModelProperty(description = "企业名称")
    private String enterpriseName;
    @ApidocModelProperty(description = "部门id")
    private Integer orgId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "创建人")
    private String creatorName;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    @TableField(value = "is_deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deletedStatus;
    @ApidocModelProperty(description = "预兑付状态 0 未预兑付 1 已进入预兑付")
    private Integer advancePaymentStatus;
    @ApidocModelProperty(description = "兑付状态，1：未兑付，2：等待兑付，3：已兑付，4：逾期未兑付，5：逾期已兑付")
    private Integer cashStatus;
    @ApidocModelProperty(description = "打款凭证，文件唯一标识")
    private String paymentVouchers;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "兑付日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date cashTime;
    @ApidocModelProperty(description = "是否指定流转企业，0否 1 是")
    private Integer circulationEnterpriseFlag;
    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private Integer paymentMode;
    @ApidocModelProperty(description = "企业冻结状态，0未冻结 1 冻结")
    private Integer enterpriseFreezingStatus;
    @ApidocModelProperty(description = "期限")
    private Integer limitDays;

}
